package vinux.web.common.es.mapping;

import java.io.IOException;

import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;


/**
 * @ClassName ExpenseAcountMapping.java	
 * @Descreption 
 * @author 苏超
 * 2016年11月7日
 */
public class ExpenseAcountMapping {

	public static XContentBuilder getExpenseMapping(){
		XContentBuilder mapping = null;
		try {
			mapping = XContentFactory.jsonBuilder()
					.startObject()
						.startObject("_ttl").field("enabled","flase").endObject()
						.startObject("properties")
							.startObject("id").field("type","long").field("index","not_analyzed").endObject()
							.startObject("userid").field("type","long").field("index","not_analyzed").endObject()
							.startObject("orderno").field("type","string").field("index","not_analyzed").endObject()
							.startObject("requestsn").field("type","string").field("index","not_analyzed").endObject()
							.startObject("ordercomminuty").field("type","string").field("index","not_analyzed").endObject()
							.startObject("applymoney").field("type","string").field("index","not_analyzed").endObject()
							.startObject("comminutyid").field("type","string").field("index","not_analyzed").endObject()
							.startObject("applypensionindex").field("type","string").field("index","not_analyzed").endObject()
							.startObject("applyproportion").field("type","string").field("index","not_analyzed").endObject()
							.startObject("applytime").field("type","string").field("index","not_analyzed").endObject()
							.startObject("ordercreatedate").field("type","string").field("index","not_analyzed").endObject()
							.startObject("ordermoney").field("type","string").field("index","not_analyzed").endObject()
							.startObject("ordertype").field("type","string").field("index","not_analyzed").endObject()
							.startObject("applytype").field("type","string").field("index","not_analyzed").endObject()
							.startObject("accountoutid").field("type","string").field("index","not_analyzed").endObject()
						.endObject()
					.endObject();
			
		} catch (IOException e) {
			e.printStackTrace();
		}
		return mapping;
	}
}
